<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
    
    <button onclick="clickbtn()" >按钮</button>
    <script>
        //HTML事件缺点：HTML和JS没有分离
        function clickbtn(){
            console.log("点击了按钮");
            
        }
HTML
    </script>

</body>
</html>